Trivia API
Code Quality & Documentation
Criteria | Meet Specification |
---|---|
Write clear, concise and well documented code |
The code adheres to the PEP 8 style guide and follows common best practices, including:
|
Write an informative README File |
README includes:
|
Leverage environment controls |
Local files and virtual environment are included in .gitignore file |
Handling HTTP Requests
Criteria | Meet Specification |
---|---|
Follow RESTful principles |
RESTful principles are followed throughout the project, including appropriate naming of endpoints, use of HTTP methods GET, POST, and DELETE. Routes perform CRUD operations on the psql database |
Utilize multiple HTTP request methods |
Complete all TODO flags in
|
Handle common errors |
Project handles common errors using the
Passes all provided tests related to error handling |
API Testing & Documentation
Criteria | Meet Specification |
---|---|
Use unittest to test flask application for expected behavior |
Import and utilize unittest library to test each endpoint for expected success and error behavior. Each endpoint should have at one test for the expected behavior and tests for error handling if applicable. |
Demonstrate validity of API responses |
Project includes tests to ensure CRUD operations are successful and persist accurately in the database for GET, POST, PUT and DELETE HTTP requests. |
Tips to make your project standout:
-
Add an additional question field such as rating and make all corresponding updates (db, api endpoints, add question form, etc.)
-
INTENSE: Add users to the DB and track their game scores
-
Add capability to create new categories.